package com.hdoit.kylin.web.document.modelconfig;

import com.hdoit.kylin.web.money.providers.ProjectOwnProvider;
import com.hdoit.kylin.web.studentManager.providers.StudentOwnProvider;
import com.hdoit.kylin.web.studentManager.providers.TeacherOwnProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      lufu
 * @email       
 * @createtime  2017年08月10日 14:48:17
 * @comment
 */
public class WeekLogSearchConfig extends ModelMetadataAttributeConfiguration{
    public WeekLogSearchConfig(){
        this.setProperty("name")
            .hasAttribute(new DisplayNameAttribute("任务名称"));

        this.setProperty("content")
            .hasAttribute(new DisplayNameAttribute("任务正文"));

        this.setProperty("teacherId")
            .hasAttribute(new DisplayNameAttribute("老师选择"))
            .hasAttribute(new DropDownListAttribute(new TeacherOwnProvider()));

        this.setProperty("employeeId")
            .hasAttribute(new DisplayNameAttribute("人员选择"))
            .hasAttribute(new DropDownListAttribute(new StudentOwnProvider()));

        this.setProperty("startDate")
            .hasAttribute(new DisplayNameAttribute("开始时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("endDate")
            .hasAttribute(new DisplayNameAttribute("完成时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("groupId")
            .hasAttribute(new DisplayNameAttribute("课题组"));

        this.setProperty("projectId")
            .hasAttribute(new DisplayNameAttribute("项目"))
            .hasAttribute(new DropDownListAttribute(new ProjectOwnProvider()));

        this.setProperty("comments")
            .hasAttribute(new DisplayNameAttribute("备注"));

    }
}